package com.tongfusoft.web.core;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import org.codehaus.jackson.map.ObjectMapper;

public class Constant {
	/**
	 * Session 中当前登录的用户对象 Key
	 */
	public static final String SESSION_USER = "currUser";
	
	public static final String REF_PATH = "refPath";
	
	/**
	 * session中主log的logId
	 */
	public static final String SESSION_LOGID = "currLogId";
	
	/**
	 * jqgird传递的操作符--更新
	 */
	public static final String OPER_EDIT = "edit";
	
	/**
	 * jqgird传递的操作符--删除
	 */
	public static final String OPER_DEL = "del";
	
	/**
	 * jqgird传递的操作符--新增
	 */
	public static final String OPER_ADD = "add";
	
	/**
	 * jqgrid查询key
	 */
	public static final String GRID_KEY = "gridKey";
	
	/**
	 * 查询字典使用的key
	 */
	public static final String REQDICTCODE = "dictCode";
	
	
	//
	public static final String DES_KEY = "873Adk8729GS";
	
	/**
	 * Application中系统参数表的key
	 */
	public static final String SYSTEMPARAM = "systemParam";
	
	/**
	 * Application中字典表的key
	 */
	public static final String DICTIONARY = "dictionary";
	
	/**
	 * Application中默认项目ID的key
	 */
	public static final String DEFAULTPROJECT = "defaultProject";
	
	/**
	 * session中当前用户所属项目Id的key
	 */
	public static final String CURRPROJECT = "currProject";
	
	public static final ObjectMapper OBJECTMAPPER = new ObjectMapper();
	
	static{
		 DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  
		 OBJECTMAPPER.getSerializationConfig().setDateFormat(df);  
		 OBJECTMAPPER.getDeserializationConfig().setDateFormat(df);
	}
}
